//
//  E7Unit.cpp
//  EndlessBattle
//
//  Created by cc on 12-3-17.
//  Copyright (c) 2012年 PalmGame. All rights reserved.
//

#include "E7Unit.h"

#include "E7Logic.h"

CE7Unit::CE7Unit()
{
    s_pLogic->create_unit_count++ ;
}

CE7Unit::~CE7Unit()
{
    s_pLogic->delete_unit_count++ ;
//    printf("CE7Unit delete unit: [%d][%d]\n", m_nID, s_pLogic->delete_unit_count) ;
}

void CE7Unit::Create(int nID, eUnitValue value, int countryid, int townid, int cellid, bool isactioned)
{
    m_nID = nID ;
    m_bIsActioned = isactioned ;
    m_bIsShow = true ;
    m_eValue = value ;

    m_nCountryID = countryid ;
    m_nTownID = townid ;
    m_nCellID = cellid ;

//    printf("CE7Unit create function: [%d][%d]\n", m_nID, s_pLogic->create_unit_count) ;
}

void CE7Unit::ResetAction()
{
    m_bIsActioned = false ;
}

bool CE7Unit::IsActioned()
{
    if (UV_SOLDIER_1 != m_eValue && UV_SOLDIER_2 != m_eValue && UV_SOLDIER_3 != m_eValue)
    {
        return true ;
    }

    return m_bIsActioned ;
}



















